-
Notifications
You must be signed in to change notification settings - Fork 68
[SDK-400] Validate url, secret, and topic list on webhook creation. #1281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
d1de339 to
1ef4ddf
Compare
1ef4ddf to
f4940b7
Compare
| Information on configuring your server can be found here (this is where the url points to and the secret is set). | ||
| https://docs.labelbox.com/en/configure-editor/webhooks-setup#setup-steps | ||
| https://docs.labelbox.com/reference/webhook |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A little out of scope, but this docs link is broken.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
kopreschko
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work in both the API and SDK by adding tests for these validations! Just some minor observations, the rest looks good to me.
|
|
||
| webhook.delete() | ||
|
|
||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These, in my opinion, should be considered unit-tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a lot of tests in integration that could be better considered a unit test, but this needs a configured project and client which only exist in integration fixtures, and pulling them out would be too much of a pain for this I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
client and project could be mocks, the exceptions are thrown before these are used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. I moved them to unit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Second Klaus comments, after that can approve
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be fixed now and checks are passing, can I get an approval?
kopreschko
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice work Sam!
Check that these fields are non-empty on creation to match frontend behavior.